import { Body, Controller, Get, Param, Post } from '@nestjs/common';
import { ProductService } from '../service/product.service';
import { ListProductDto } from '../dto/product/list-product.dot';

@Controller('custom/product')
export class ProductController {
  constructor(private readonly productService: ProductService) {}

  @Post()
  findAll(@Body() listProductDto: ListProductDto) {
    console.log(11111, listProductDto)
    return this.productService.findAll(listProductDto);
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.productService.findOne(+id);
  }
}
